objFiles = dir('D:\Usagers\trembl66\Data.nobkp\Test\Side\Training\');
objFileIndex = find(~[objFiles.isdir]);
nbFiles = length(objFileIndex);
ratios = zeros(nbFiles,1);
for i=1:nbFiles 
    objFilename = objFiles(objFileIndex(i)).name;
    obj = imread(cat(2,'D:\Usagers\trembl66\Data.nobkp\Test\Side\Training\',objFilename));
    if(size(obj,3)>1)
        objYCRCB = rgb2ycbcr(obj);
        obj = reshape(objYCRCB(:,:,1),size(objYCRCB,1),size(objYCRCB,2));
    end
    ratio = size(obj,2)/size(obj,1);
    ratios(i,:) = ratio;
end
hist(ratios)